// components/Scroll/Scroll.ts
Component({

  /**
   * 组件的属性列表
   */
  properties: {

  },

  /**
   * 组件的初始数据
   */
  data: {
    height: '0'
  },

  /**
   * 组件的方法列表
   */
  methods: {
    getScrollHeight() {
      const query = this.createSelectorQuery()
      query.select('#scroll').boundingClientRect().selectViewport()
      query.exec((res: any) => {
        this.setData({ height: res[0].height })
      })
    }
  },
  lifetimes: {
    ready() {
      this.getScrollHeight()
    }
  }
})